import React, {useEffect, useRef} from 'react';
import './App.css';
import Home from "./page/home/Home";
import {DndProvider} from "react-dnd";
import {HTML5Backend} from "react-dnd-html5-backend";
import {useSize} from "ahooks";
import Filter, {FilterHeight} from "./page/home/Filter";
import Test from './Test';

const App = () => {
  const ref = useRef(null);
  const size = useSize(ref);
  return (
    <div ref={ref}>
      <DndProvider backend={HTML5Backend}>
        <Filter/>
        {/* <Test/> */}
        <Home height={size ? size.height - FilterHeight : 1000} width={size ? size.width : 1920}/>
      </DndProvider>
    </div>
  );
};

export default App;
